package com.air.designmodel.six.common;

import lombok.Data;

import java.io.Serializable;

/**
 * @author shent
 */
@Data
public class CommonPairResponse<T, R> {
    private Integer code;
    private String message;

    public CommonPairResponse(String s, Object o) {
        this.message = s;
        System.out.println("success:" + s + " " + o);
    }

    public CommonPairResponse(String s) {
        this.message = s;
        System.out.println("failure:" + s);
    }

    public static CommonPairResponse<String, Serializable> success(String s, Object o) {
        return new CommonPairResponse(s, o);
    }

    public static CommonPairResponse<String, Serializable> failure(String s) {
        return new CommonPairResponse(s);
    }
}
